package com.rd.student.ruanjian.class4.zhouzihe.day18;

import java.io.*;

public class TestConvert {
    public static void main(String[] args) throws Exception{
        //字节流转换为字符流
        InputStream is = new FileInputStream("stream.txt");
        Reader reader  = new InputStreamReader(is);
        File file = new File("stream.txt");
        char[] arr = new char[(int) file.length()];
        reader.read(arr);
        System.out.println(new String(arr));
        reader.close();
        is.close();
    }
}
